﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Globalization;
using InstantNaukriDAL;
using System.Data;

public partial class ResumeSearchByIndustry : System.Web.UI.Page
{
    string mode = "ByIndustry";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            FillIndustry();
        }
    }
    protected void FillIndustry()
    {
        try
        {
            clsEmployerDAL objclsSkillsMasterDAL = new clsEmployerDAL();
            List<IN_TB_EMPLOYER_MST> objIN_TB_SKILL_MST = new List<IN_TB_EMPLOYER_MST>();
            objIN_TB_SKILL_MST = objclsSkillsMasterDAL.GetAllEmployer(); ;
            rptSkills.DataSource = objIN_TB_SKILL_MST;
            rptSkills.DataBind();
        }
        catch (Exception)
        {

            throw;
        }
    }

    protected void rptSkills_ItemCommand(object source, DataListCommandEventArgs e)
    {
        if (Convert.ToString(e.CommandName) == "SkillsSearch")
        {
            string industry = Convert.ToString(e.CommandArgument);
            if (industry != "")
            {
                mode = clsEncryptionDecryption.EncryptQueryString(mode);
                Response.Redirect("ResumeSearchResult.aspx?mode=" + mode + "&industryset=" + clsEncryptionDecryption.EncryptQueryString(industry.Trim().ToLower()) + "&roleid=" + Convert.ToString(Request.QueryString["roleid"]));

            }

        }
    }


    protected void btnSeachBySkills_Click(object sender, EventArgs e)
    {
        try
        {
            if (txtKeySkills.Text != "")
            {
                mode = clsEncryptionDecryption.EncryptQueryString(mode);
                Response.Redirect("ResumeSearchResult.aspx?mode=" + mode + "&industryset=" + clsEncryptionDecryption.EncryptQueryString(txtKeySkills.Text.Trim().ToLower()) + "&roleid=" + Convert.ToString(Request.QueryString["roleid"]));
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
    protected void btnClearSearch_Click(object sender, EventArgs e)
    {
        try
        {
            txtKeySkills.Text = "";
        }
        catch (Exception)
        {

            throw;
        }
    }

}